<template>
  <div>
    <LazyLoadTab v-model="activeName" :tabMenus="menus" :destroyOnClose="true"></LazyLoadTab>
  </div>
</template>

<script>
export default {
  name: 'returnSales',
  data() {
    return {
      activeName: '未完成',
      menus: [
        {
          title: '未完成',
          path: 'potenCus/customer/returnSales/tabs/sales',
          params: {
            isComplete: 10041002
          }
        },
        {
          title: '已完成',
          path: 'potenCus/customer/returnSales/tabs/sales',
          params: {
            isComplete: 10041001
          }
        },
        {
          title: '全部',
          path: 'potenCus/customer/returnSales/tabs/sales',
          params: {
            isComplete: 10041003
          }
        },
      ]
    };
  },
  mounted() {
    switch (this.$route.query.active) {
      case 1:
        this.menus[2].params.searchData = {
          planActionDate: this.$route.query.time,
          planActionDateEnd: this.$route.query.time,
        }
        this.activeName = '全部'
        break;
      case 2:
        this.menus[0].params.searchData = {
          planActionDate: this.$route.query.time,
          planActionDateEnd: this.$route.query.time,
        }
        this.activeName = '未完成'
        break;
      case 3:
        this.menus[2].params.searchData = {
          planActionDate: this.$route.query.time,
          planActionDateEnd: this.$route.query.time,
          isOverdue: 70441001
        }
        this.activeName = '全部'
        break;
      case 4:
        this.menus[2].params.searchData = {
          planActionDate: this.$route.query.time,
          planActionDateEnd: this.$route.query.time,
        }
        this.activeName = '全部'
        break;
      default:
        break;
    }
  },
};
</script>

<style lang="less" scoped>
</style>
